package com.zh.spring.mapper;

import com.zh.spring.domain.City;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 描述：com.zh.spring.mapper
 *
 * @author 80002023
 *         2016/12/29.
 * @version 1.0
 * @since 1.8
 */
@Mapper
public interface CityDao {

    @Select("select * from city where name = #{name}")
    City findByName(String name);

    @Insert("insert into city(id,name,state) value(#{id},#{name},#{state})")
    Integer insert(City city);
}
